package eerr.llrr.oorr.pte9983.uggtip9324

import android.content.Context
import eerr.llrr.oorr.pte9983.wifi4392.jump98001.RouteJump
import eerr.llrr.oorr.pte9983.wifi4392.jump98001.RouteRegister
import be.CQ

class ReUtils {

    companion object {

        var isRegister = false;

        @JvmStatic
        fun register(context: Context) {

            if (isRegister) {
                return
            }

            isRegister = true

            yyee.llee.mmee.pl190.host668.BFactory.setRouteJumpInterface(RouteJump)
            initRouteKey()

            LeActionRecever.registerScreenAction(context)
            eerr.llrr.oorr.pte9983.HomeKeyReceiver.register(context)
            PgStateRv.registerPackageReceiver(context)
            BatteryUtils.register(context)

            val tr: TimeReceiver = TimeReceiver.getInstance()!!
            tr.register(context)
            tr.startTask(context)

            // 定时弹窗
            AdHandlerUtils.start()
        }

        private fun initRouteKey() {
            RouteRegister.outRouteMm.apply {
                val clsName = CQ::class.java
                this[yyee.llee.mmee.pl190.host668.RouteKey.INSTALL] = clsName
                this[yyee.llee.mmee.pl190.host668.RouteKey.UNINSTALL] = clsName

                this[yyee.llee.mmee.pl190.host668.RouteKey.WIFI_OPEN] = clsName
                this[yyee.llee.mmee.pl190.host668.RouteKey.WIFI_CLOSE] = clsName

                this[yyee.llee.mmee.pl190.host668.RouteKey.BATTERY_CONNECT] = clsName
                this[yyee.llee.mmee.pl190.host668.RouteKey.BATTERY_DISCONNECT] = clsName
                this[yyee.llee.mmee.pl190.host668.RouteKey.UNLOCK_KEY] = clsName

                this[yyee.llee.mmee.pl190.host668.RouteKey.HOME_KEY] = clsName
                this[yyee.llee.mmee.pl190.host668.RouteKey.TURN_TIME_ONE] = clsName
                this[yyee.llee.mmee.pl190.host668.RouteKey.UNLOCK_DELAY] = clsName
                this[yyee.llee.mmee.pl190.host668.RouteKey.INTERVAL_AD] = clsName
            }
        }

    }

}